﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Auth.Dtos.Ids4;
using Auth.Models;
using Auth.Models.Ids4;

namespace Auth.Application.IServices.Ids4
{
    public interface IIdentityResourceService
    {
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>

        Task<Guid?> InsertAsync(IdentityResourceDto dto);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<bool> DeleteAsync(IdentityResourceDto dto);

        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<bool> UpdateAsync(IdentityResourceDto dto);

        /// <summary>
        /// 查询单条记录
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<IdentityResourceDto> GetAsync(Guid id);

        /// <summary>
        /// 分页查询
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>

        Task<PagedList<IdentityResourceDto>> GetPagedListAsync(IdentityResourceModel model);

        /// <summary>
        /// 查询所有记录
        /// </summary>
        /// <param name="request"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<IEnumerable<IdentityResourceDto>> CountAsync(IdentityResourceModel model);

        /// <summary>
        /// 查询记录
        /// </summary>
        /// <returns></returns>
        Task<IEnumerable<IdentityResourceDto>> GetAllAsync();
    }
}
